import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Queue;

public class Test {
    public static void main2(String[] args) {
        TestHeap testHeap = new TestHeap();
        int[] array = {1,12,15,45,85,30,1,14,23};
        int[] ret = testHeap.maxK(array,4);
        for (int i = 0; i < 4; i++) {
            System.out.print(ret[i]+" ");
        }

    }
    public static void main3(String[] args) {
//        Queue<Integer> priorityQueue1 = new PriorityQueue<>();
//        priorityQueue1.offer(null);
//        priorityQueue1.offer(10);
//        priorityQueue1.offer(2);
//        System.out.println(priorityQueue1.poll());
        Queue<Student> priorityQueue2 = new PriorityQueue<>();
        priorityQueue2.offer(new Student(13,"zhangsan"));
        priorityQueue2.offer(new Student(13,"zhangsan"));
        System.out.println();


    }
    public static void main1(String[] args) {
        TestHeap testHeap = new TestHeap();
        int[] array = {27, 15, 19, 18, 28, 34, 65, 49, 25, 37};
        testHeap.initElem(array);
        testHeap.createHeap();
        //testHeap.offer(88);//表示插入一个数据88
        testHeap.pop();
        System.out.println();
    }

    public static void main4(String[] args) {
        Student student1 = new Student(12,"zhangsan");
        Student student2 = new Student(13,"zhangsan");
        ageComparator ageComparator = new ageComparator();
        int ret = ageComparator.compare(student1,student2);
        System.out.println(ret);
//        NameComparator nameComparator = new NameComparator();
//        int ret = nameComparator.compare(student1,student2);
//        System.out.println(ret);
        //System.out.println(student1.compareTo(student2));
        //System.out.println(student1.equals(student2));
        //        System.out.println(student1 == student2);
    }

    public static void main5(String[] args) {
        Incmp incmp = new Incmp();
        Queue<Integer> priorityQueue = new PriorityQueue<>(incmp);//这样priorityQueue就拿到了比较器
        priorityQueue.offer(56);
        priorityQueue.offer(27);
        System.out.println();
    }

    public static void main6(String[] args) {
        boolean b = true ? false : true == true ? false : true;
        System.out.println(b);
    }

    public static void main(String[] args) {
        TestHeap testHeap = new TestHeap();
        int[] array ={12,45,26,43,11,16,35,34,12};
        testHeap.initElem(array);
        testHeap.createHeap();
        System.out.println(Arrays.toString(array));
    }
}